import request from '@/utils/request'

// 查询用户信息列表
export function listUser(query) {
  return request({
    url: '/userlocation/user/list',
    method: 'get',
    params: query
  })
}

// 修改用户
export function updateUser(data) {
  return request({
    url: '/userlocation/user',
    method: 'put',
    data: data
  })
}

// 新增用户
export function addUser(data) {
  return request({
    url: '/userlocation/user',
    method: 'post',
    data: data
  })
}

// 删除用户
export function delUser(userId) {
  return request({
    url: '/userlocation/user/' + userId,
    method: 'delete'
  })
}

// 用户详情
export function detailsUser(userId) {
  return request({
    url: '/userlocation/user/' + userId,
    method: 'get'
  })
}

export function detailsUserId(userId) {
  return request({
    url: '/userlocation/user/userId/' + userId,
    method: 'get'
  })
}



// 用户发布内容管理
export function detailsUser2(query) {
  return request({
    url: '/userlocation/blog/user',
    method: 'get',
    params: query

  })
}

// 用户关注
export function addUserFocus(data) {
  return request({
    url: '/userlocation/user/tofollow',
    method: 'post',
    data: data
  })
}

// 用户取消关注
export function cancelUserFocus(data) {
  return request({
    url: '/userlocation/user/unfollow',
    method: 'post',
    data: data
  })
}

//发微博带图片
export function releaseContent(data) {
  return request({
    url: '/userlocation/user/sendWeiBo',
    method: 'post',
    data: data
  })
}

//删除微博
export function deleteWeoBo(data){
  return request({
    url: '/userlocation/user/todestroy',
    method: 'post',
    data: data
  })
}



// 用户社交关系管理
export function detailsRelationship(userId) {
  return request({
    url: '/userlocation/relation/user/'+userId,
    method: 'get',
  })
}
// 用户社交关系管理
export function detailsRelationship3(userId) {
  return request({
    url: '/userlocation/relation/user/'+userId,
    method: 'get',
  })
}


export function detailsRelationship5(userId) {
  return request({
    url: '/combat/relationWb/user/' + userId,
    method: 'get'
  })
}

//统计图数据
export function getStatisticsData(userId) {
  return request({
    url: '/userlocation/blog/sendStatistics?userId='+userId,
    method: 'get',
  })
}
//统计图数据
export function numberStatistics(userId) {
  return request({
    url: '/userlocation/blog/numberStatistics?userId='+userId,
    method: 'get',
  })
}
